package com.nutstudio.feilproject.net;

import com.nutstudio.feilproject.Constant;
import com.nutstudio.feilproject.bean.TestBean;

import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Query;

/**
 * 请求参数接口
 * Created by yangle on 2017/6/26.
 */

public interface RetrofitService {

    /**
     * 获取快递信息
     * Rx方式
     *
     * @param type   快递类型
     * @param postid 快递单号
     * @return Observable<ExpressInfo>
     */
    @GET(Constant.UrlOrigin.get_express_info)
    Observable<TestBean> getTestInfoRx(@Query("code") int code);


    @POST(Constant.UrlOrigin.get_post_test_info)
    Observable<TestBean> postTestInfoRx(@Query("code") int code);


    @Multipart
    @POST(Constant.UrlOrigin.upload_pic)
    Observable<TestBean> uploadFiles(@Query("des") String des, @PartMap Map<String, RequestBody> params);


/*
    @GET("group/{id}/users")
    Call<List<User>> groupList(@Path("id") int groupId);


@GET("group/{id}/users")
Call<List<User>> groupList(@Path("id") int groupId, @Query("sort") String sort);

@Headers("Cache-Control: max-age=640000")
@GET("group/{id}/users")
Call<List<User>> groupList(@Path("id") int groupId, @QueryMap Map<String, String> options);


@POST("users/new")
Call<User> createUser(@Body User user);

@Multipart
@PUT("user/photo")
Call<User> updateUser(@Part("photo") RequestBody photo, @Part("description") RequestBody description);


    */

}
